package cn.xs.order.service.impl;


import java.util.List;

import javax.annotation.Resource;

import org.springframework.stereotype.Service;

import cn.xs.core.service.impl.BaseServiceImpl;
import cn.xs.order.dao.OrderDao;
import cn.xs.order.entity.Order;
import cn.xs.order.service.OrderService;

@Service("orderService")
public class OrderServiceImpl extends BaseServiceImpl<Order> implements
		OrderService {
	
	private OrderDao orderDao;
	@Resource
	public void setOrderDao(OrderDao orderDao) {
		super.setBaseDao(orderDao);
		this.orderDao = orderDao;
	}
	
	public void setOrderStatus(String orderId, String status) {
		orderDao.setOrderStatus(orderId,status);
	}

	public List<Order> findOrdersByUserId(String userid) {
		// TODO Auto-generated method stub
		return orderDao.findOrdersByUserId(userid);
	}

	public List<Order> findAllByStatus(String status) {
		// TODO Auto-generated method stub
		return orderDao.findAllByStatus(status);
	}
}
